\(\int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx\) [324]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 116 \[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {(2 a+b) \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )}{2 a^{3/2} f}-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{\sqrt {a-b} f}-\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f} \]

[Out]

1/2*(2*a+b)*arctanh((a+b*tan(f*x+e)^2)^(1/2)/a^(1/2))/a^(3/2)/f-arctanh((a+b*tan(f*x+e)^2)^(1/2)/(a-b)^(1/2))/
f/(a-b)^(1/2)-1/2*cot(f*x+e)^2*(a+b*tan(f*x+e)^2)^(1/2)/a/f

Rubi [A] (verified)

Time = 0.19 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3751, 457, 105, 162, 65, 214} \[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {(2 a+b) \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )}{2 a^{3/2} f}-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{f \sqrt {a-b}}-\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f} \]

[In]

Int[Cot[e + f*x]^3/Sqrt[a + b*Tan[e + f*x]^2],x]

[Out]

((2*a + b)*ArcTanh[Sqrt[a + b*Tan[e + f*x]^2]/Sqrt[a]])/(2*a^(3/2)*f) - ArcTanh[Sqrt[a + b*Tan[e + f*x]^2]/Sqr
t[a - b]]/(Sqrt[a - b]*f) - (Cot[e + f*x]^2*Sqrt[a + b*Tan[e + f*x]^2])/(2*a*f)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 105

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(a +
b*x)^(m + 1)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/((m + 1)*(b*c - a*d)*(b*e - a*f))), x] + Dist[1/((m + 1)*(b*
c - a*d)*(b*e - a*f)), Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*(m + 1) - b*(d*e*(m + n + 2) +
 c*f*(m + p + 2)) - b*d*f*(m + n + p + 3)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && ILtQ[m, -1] &
& (IntegerQ[n] || IntegersQ[2*n, 2*p] || ILtQ[m + n + p + 3, 0])

Rule 162

Int[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :>
 Dist[(b*g - a*h)/(b*c - a*d), Int[(e + f*x)^p/(a + b*x), x], x] - Dist[(d*g - c*h)/(b*c - a*d), Int[(e + f*x)
^p/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{x^3 \left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \frac {1}{x^2 (1+x) \sqrt {a+b x}} \, dx,x,\tan ^2(e+f x)\right )}{2 f} \\ & = -\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f}-\frac {\text {Subst}\left (\int \frac {\frac {1}{2} (2 a+b)+\frac {b x}{2}}{x (1+x) \sqrt {a+b x}} \, dx,x,\tan ^2(e+f x)\right )}{2 a f} \\ & = -\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f}+\frac {\text {Subst}\left (\int \frac {1}{(1+x) \sqrt {a+b x}} \, dx,x,\tan ^2(e+f x)\right )}{2 f}-\frac {(2 a+b) \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\tan ^2(e+f x)\right )}{4 a f} \\ & = -\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f}+\frac {\text {Subst}\left (\int \frac {1}{1-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b \tan ^2(e+f x)}\right )}{b f}-\frac {(2 a+b) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b \tan ^2(e+f x)}\right )}{2 a b f} \\ & = \frac {(2 a+b) \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )}{2 a^{3/2} f}-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{\sqrt {a-b} f}-\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.83 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.16 \[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {\left (2 a^2-a b-b^2\right ) \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )+\sqrt {a} \left (-2 a \sqrt {a-b} \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )+(-a+b) \cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}\right )}{2 a^{3/2} (a-b) f} \]

[In]

Integrate[Cot[e + f*x]^3/Sqrt[a + b*Tan[e + f*x]^2],x]

[Out]

((2*a^2 - a*b - b^2)*ArcTanh[Sqrt[a + b*Tan[e + f*x]^2]/Sqrt[a]] + Sqrt[a]*(-2*a*Sqrt[a - b]*ArcTanh[Sqrt[a +
b*Tan[e + f*x]^2]/Sqrt[a - b]] + (-a + b)*Cot[e + f*x]^2*Sqrt[a + b*Tan[e + f*x]^2]))/(2*a^(3/2)*(a - b)*f)

Maple [B] (warning: unable to verify)

Leaf count of result is larger than twice the leaf count of optimal. \(1179\) vs. \(2(98)=196\).

Time = 1.14 (sec) , antiderivative size = 1180, normalized size of antiderivative = 10.17

method result size
default \(\text {Expression too large to display}\) \(1180\)

[In]

int(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/8/f/a^(5/2)/(a-b)^(1/2)*(a*(-cos(f*x+e)+1)^4*csc(f*x+e)^4-2*a*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+4*b*(-cos(f*x+
e)+1)^2*csc(f*x+e)^2+a)^(1/2)/((a*(-cos(f*x+e)+1)^4*csc(f*x+e)^4-2*a*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+4*b*(-cos(
f*x+e)+1)^2*csc(f*x+e)^2+a)/((-cos(f*x+e)+1)^2*csc(f*x+e)^2-1)^2)^(1/2)/((-cos(f*x+e)+1)^2*csc(f*x+e)^2-1)/(-c
os(f*x+e)+1)^2*((a*(-cos(f*x+e)+1)^4*csc(f*x+e)^4-2*a*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+4*b*(-cos(f*x+e)+1)^2*csc
(f*x+e)^2+a)^(1/2)*a^(3/2)*(-cos(f*x+e)+1)^2*(a-b)^(1/2)-8*ln(4*(-a*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+b*(-cos(f*x
+e)+1)^2*csc(f*x+e)^2+(a-b)^(1/2)*(a*(-cos(f*x+e)+1)^4*csc(f*x+e)^4-2*a*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+4*b*(-c
os(f*x+e)+1)^2*csc(f*x+e)^2+a)^(1/2)+a-b)/((-cos(f*x+e)+1)^2*csc(f*x+e)^2+1))*a^(5/2)*(-cos(f*x+e)+1)^2-4*ln((
a*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+(a*(-cos(f*x+e)+1)^4*csc(f*x+e)^4-2*a*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+4*b*(-co
s(f*x+e)+1)^2*csc(f*x+e)^2+a)^(1/2)*a^(1/2)-a+2*b)/a^(1/2))*a^2*(-cos(f*x+e)+1)^2*(a-b)^(1/2)+4*ln(2/(-cos(f*x
+e)+1)^2*(-a*(-cos(f*x+e)+1)^2+2*b*(-cos(f*x+e)+1)^2+(a*(-cos(f*x+e)+1)^4*csc(f*x+e)^4-2*a*(-cos(f*x+e)+1)^2*c
sc(f*x+e)^2+4*b*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+a)^(1/2)*a^(1/2)*sin(f*x+e)^2+a*sin(f*x+e)^2))*a^2*(-cos(f*x+e)
+1)^2*(a-b)^(1/2)-2*ln((a*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+(a*(-cos(f*x+e)+1)^4*csc(f*x+e)^4-2*a*(-cos(f*x+e)+1)
^2*csc(f*x+e)^2+4*b*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+a)^(1/2)*a^(1/2)-a+2*b)/a^(1/2))*a*(-cos(f*x+e)+1)^2*(a-b)^
(1/2)*b+2*ln(2/(-cos(f*x+e)+1)^2*(-a*(-cos(f*x+e)+1)^2+2*b*(-cos(f*x+e)+1)^2+(a*(-cos(f*x+e)+1)^4*csc(f*x+e)^4
-2*a*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+4*b*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+a)^(1/2)*a^(1/2)*sin(f*x+e)^2+a*sin(f*x
+e)^2))*a*(-cos(f*x+e)+1)^2*(a-b)^(1/2)*b-(a*(-cos(f*x+e)+1)^4*csc(f*x+e)^4-2*a*(-cos(f*x+e)+1)^2*csc(f*x+e)^2
+4*b*(-cos(f*x+e)+1)^2*csc(f*x+e)^2+a)^(1/2)*a^(3/2)*(a-b)^(1/2)*sin(f*x+e)^2)

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 697, normalized size of antiderivative = 6.01 \[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\left [\frac {2 \, \sqrt {a - b} a^{2} \log \left (\frac {b \tan \left (f x + e\right )^{2} - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a - b} + 2 \, a - b}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{2} + {\left (2 \, a^{2} - a b - b^{2}\right )} \sqrt {a} \log \left (\frac {b \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a} + 2 \, a}{\tan \left (f x + e\right )^{2}}\right ) \tan \left (f x + e\right )^{2} - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a^{2} - a b\right )}}{4 \, {\left (a^{3} - a^{2} b\right )} f \tan \left (f x + e\right )^{2}}, -\frac {4 \, a^{2} \sqrt {-a + b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b}}{a - b}\right ) \tan \left (f x + e\right )^{2} - {\left (2 \, a^{2} - a b - b^{2}\right )} \sqrt {a} \log \left (\frac {b \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a} + 2 \, a}{\tan \left (f x + e\right )^{2}}\right ) \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a^{2} - a b\right )}}{4 \, {\left (a^{3} - a^{2} b\right )} f \tan \left (f x + e\right )^{2}}, \frac {\sqrt {a - b} a^{2} \log \left (\frac {b \tan \left (f x + e\right )^{2} - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a - b} + 2 \, a - b}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{2} - {\left (2 \, a^{2} - a b - b^{2}\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a}}{a}\right ) \tan \left (f x + e\right )^{2} - \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a^{2} - a b\right )}}{2 \, {\left (a^{3} - a^{2} b\right )} f \tan \left (f x + e\right )^{2}}, -\frac {2 \, a^{2} \sqrt {-a + b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b}}{a - b}\right ) \tan \left (f x + e\right )^{2} + {\left (2 \, a^{2} - a b - b^{2}\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a}}{a}\right ) \tan \left (f x + e\right )^{2} + \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a^{2} - a b\right )}}{2 \, {\left (a^{3} - a^{2} b\right )} f \tan \left (f x + e\right )^{2}}\right ] \]

[In]

integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

[1/4*(2*sqrt(a - b)*a^2*log((b*tan(f*x + e)^2 - 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(a - b) + 2*a - b)/(tan(f*x +
 e)^2 + 1))*tan(f*x + e)^2 + (2*a^2 - a*b - b^2)*sqrt(a)*log((b*tan(f*x + e)^2 + 2*sqrt(b*tan(f*x + e)^2 + a)*
sqrt(a) + 2*a)/tan(f*x + e)^2)*tan(f*x + e)^2 - 2*sqrt(b*tan(f*x + e)^2 + a)*(a^2 - a*b))/((a^3 - a^2*b)*f*tan
(f*x + e)^2), -1/4*(4*a^2*sqrt(-a + b)*arctan(-sqrt(b*tan(f*x + e)^2 + a)*sqrt(-a + b)/(a - b))*tan(f*x + e)^2
 - (2*a^2 - a*b - b^2)*sqrt(a)*log((b*tan(f*x + e)^2 + 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(a) + 2*a)/tan(f*x + e
)^2)*tan(f*x + e)^2 + 2*sqrt(b*tan(f*x + e)^2 + a)*(a^2 - a*b))/((a^3 - a^2*b)*f*tan(f*x + e)^2), 1/2*(sqrt(a
- b)*a^2*log((b*tan(f*x + e)^2 - 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(a - b) + 2*a - b)/(tan(f*x + e)^2 + 1))*tan
(f*x + e)^2 - (2*a^2 - a*b - b^2)*sqrt(-a)*arctan(sqrt(b*tan(f*x + e)^2 + a)*sqrt(-a)/a)*tan(f*x + e)^2 - sqrt
(b*tan(f*x + e)^2 + a)*(a^2 - a*b))/((a^3 - a^2*b)*f*tan(f*x + e)^2), -1/2*(2*a^2*sqrt(-a + b)*arctan(-sqrt(b*
tan(f*x + e)^2 + a)*sqrt(-a + b)/(a - b))*tan(f*x + e)^2 + (2*a^2 - a*b - b^2)*sqrt(-a)*arctan(sqrt(b*tan(f*x
+ e)^2 + a)*sqrt(-a)/a)*tan(f*x + e)^2 + sqrt(b*tan(f*x + e)^2 + a)*(a^2 - a*b))/((a^3 - a^2*b)*f*tan(f*x + e)
^2)]

Sympy [F]

\[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int \frac {\cot ^{3}{\left (e + f x \right )}}{\sqrt {a + b \tan ^{2}{\left (e + f x \right )}}}\, dx \]

[In]

integrate(cot(f*x+e)**3/(a+b*tan(f*x+e)**2)**(1/2),x)

[Out]

Integral(cot(e + f*x)**3/sqrt(a + b*tan(e + f*x)**2), x)

Maxima [F]

\[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int { \frac {\cot \left (f x + e\right )^{3}}{\sqrt {b \tan \left (f x + e\right )^{2} + a}} \,d x } \]

[In]

integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

integrate(cot(f*x + e)^3/sqrt(b*tan(f*x + e)^2 + a), x)

Giac [F]

\[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int { \frac {\cot \left (f x + e\right )^{3}}{\sqrt {b \tan \left (f x + e\right )^{2} + a}} \,d x } \]

[In]

integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.44 (sec) , antiderivative size = 830, normalized size of antiderivative = 7.16 \[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {\mathrm {atanh}\left (\frac {b^6\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{4\,\sqrt {a^3}\,\left (\frac {3\,a\,b^4}{2}+\frac {5\,b^5}{4}+\frac {b^6}{4\,a}\right )}+\frac {3\,b^4\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{2\,\sqrt {a^3}\,\left (\frac {3\,b^4}{2\,a}+\frac {5\,b^5}{4\,a^2}+\frac {b^6}{4\,a^3}\right )}+\frac {5\,b^5\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{4\,\sqrt {a^3}\,\left (\frac {3\,b^4}{2}+\frac {5\,b^5}{4\,a}+\frac {b^6}{4\,a^2}\right )}\right )\,\left (2\,a+b\right )}{2\,f\,\sqrt {a^3}}-\frac {b\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{2\,a\,\left (f\,\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )-a\,f\right )}+\frac {\mathrm {atan}\left (\frac {\frac {\left (\frac {\frac {2\,a^2\,b^3\,f^2+2\,a\,b^4\,f^2}{2\,a^2\,f^3}-\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (16\,a^2\,b^3\,f^2-32\,a^3\,b^2\,f^2\right )}{8\,a^2\,f^3\,\sqrt {a-b}}}{2\,f\,\sqrt {a-b}}-\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (8\,a^2\,b^2+4\,a\,b^3+b^4\right )}{4\,a^2\,f^2}\right )\,1{}\mathrm {i}}{f\,\sqrt {a-b}}-\frac {\left (\frac {\frac {2\,a^2\,b^3\,f^2+2\,a\,b^4\,f^2}{2\,a^2\,f^3}+\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (16\,a^2\,b^3\,f^2-32\,a^3\,b^2\,f^2\right )}{8\,a^2\,f^3\,\sqrt {a-b}}}{2\,f\,\sqrt {a-b}}+\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (8\,a^2\,b^2+4\,a\,b^3+b^4\right )}{4\,a^2\,f^2}\right )\,1{}\mathrm {i}}{f\,\sqrt {a-b}}}{\frac {\frac {\frac {2\,a^2\,b^3\,f^2+2\,a\,b^4\,f^2}{2\,a^2\,f^3}-\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (16\,a^2\,b^3\,f^2-32\,a^3\,b^2\,f^2\right )}{8\,a^2\,f^3\,\sqrt {a-b}}}{2\,f\,\sqrt {a-b}}-\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (8\,a^2\,b^2+4\,a\,b^3+b^4\right )}{4\,a^2\,f^2}}{f\,\sqrt {a-b}}+\frac {\frac {\frac {2\,a^2\,b^3\,f^2+2\,a\,b^4\,f^2}{2\,a^2\,f^3}+\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (16\,a^2\,b^3\,f^2-32\,a^3\,b^2\,f^2\right )}{8\,a^2\,f^3\,\sqrt {a-b}}}{2\,f\,\sqrt {a-b}}+\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (8\,a^2\,b^2+4\,a\,b^3+b^4\right )}{4\,a^2\,f^2}}{f\,\sqrt {a-b}}-\frac {\frac {b^4}{2}+a\,b^3}{a^2\,f^3}}\right )\,1{}\mathrm {i}}{f\,\sqrt {a-b}} \]

[In]

int(cot(e + f*x)^3/(a + b*tan(e + f*x)^2)^(1/2),x)

[Out]

(atan((((((2*a*b^4*f^2 + 2*a^2*b^3*f^2)/(2*a^2*f^3) - ((a + b*tan(e + f*x)^2)^(1/2)*(16*a^2*b^3*f^2 - 32*a^3*b
^2*f^2))/(8*a^2*f^3*(a - b)^(1/2)))/(2*f*(a - b)^(1/2)) - ((a + b*tan(e + f*x)^2)^(1/2)*(4*a*b^3 + b^4 + 8*a^2
*b^2))/(4*a^2*f^2))*1i)/(f*(a - b)^(1/2)) - ((((2*a*b^4*f^2 + 2*a^2*b^3*f^2)/(2*a^2*f^3) + ((a + b*tan(e + f*x
)^2)^(1/2)*(16*a^2*b^3*f^2 - 32*a^3*b^2*f^2))/(8*a^2*f^3*(a - b)^(1/2)))/(2*f*(a - b)^(1/2)) + ((a + b*tan(e +
 f*x)^2)^(1/2)*(4*a*b^3 + b^4 + 8*a^2*b^2))/(4*a^2*f^2))*1i)/(f*(a - b)^(1/2)))/((((2*a*b^4*f^2 + 2*a^2*b^3*f^
2)/(2*a^2*f^3) - ((a + b*tan(e + f*x)^2)^(1/2)*(16*a^2*b^3*f^2 - 32*a^3*b^2*f^2))/(8*a^2*f^3*(a - b)^(1/2)))/(
2*f*(a - b)^(1/2)) - ((a + b*tan(e + f*x)^2)^(1/2)*(4*a*b^3 + b^4 + 8*a^2*b^2))/(4*a^2*f^2))/(f*(a - b)^(1/2))
 + (((2*a*b^4*f^2 + 2*a^2*b^3*f^2)/(2*a^2*f^3) + ((a + b*tan(e + f*x)^2)^(1/2)*(16*a^2*b^3*f^2 - 32*a^3*b^2*f^
2))/(8*a^2*f^3*(a - b)^(1/2)))/(2*f*(a - b)^(1/2)) + ((a + b*tan(e + f*x)^2)^(1/2)*(4*a*b^3 + b^4 + 8*a^2*b^2)
)/(4*a^2*f^2))/(f*(a - b)^(1/2)) - (a*b^3 + b^4/2)/(a^2*f^3)))*1i)/(f*(a - b)^(1/2)) - (b*(a + b*tan(e + f*x)^
2)^(1/2))/(2*a*(f*(a + b*tan(e + f*x)^2) - a*f)) + (atanh((b^6*(a + b*tan(e + f*x)^2)^(1/2))/(4*(a^3)^(1/2)*((
3*a*b^4)/2 + (5*b^5)/4 + b^6/(4*a))) + (3*b^4*(a + b*tan(e + f*x)^2)^(1/2))/(2*(a^3)^(1/2)*((3*b^4)/(2*a) + (5
*b^5)/(4*a^2) + b^6/(4*a^3))) + (5*b^5*(a + b*tan(e + f*x)^2)^(1/2))/(4*(a^3)^(1/2)*((3*b^4)/2 + (5*b^5)/(4*a)
 + b^6/(4*a^2))))*(2*a + b))/(2*f*(a^3)^(1/2))